package org.xxpay.pay.channel.huixin;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.Assert;
import org.xxpay.common.unify.AbstractPaymentConfig;

public class HuixinConfig  extends AbstractPaymentConfig {

    public static final String CHANNEL_NAME = "huixin";
    public static final String CHANNEL_NAME_QUICK_WAP = CHANNEL_NAME + "_quick_wap";

    public static final String VIL_VERSION_VAlUE = "2.0";//版本号固定值
    public static final String VIL_CHARSET_VAlUE = "UTF-8";//UTF-8
    public static final String VIL_SIGN_TYPE_VAlUE = "MD5";//md5
    public static final String RESPONSE_RESULT_OK = "SUCCESS"; // 返回上游成功

    HuixinConfig(String payParam ){

        Assert.notNull(payParam, "init sft config error");
        JSONObject object = JSON.parseObject(payParam);
        setMchId(object.getString("mchId"));
        setPrivateKey(object.getString("privateKey"));
        setRequestUrl(object.getString("requestUrl"));

    }
}
